package com.ajax;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author wzm
 * @create 2023-05-16 14:20
 */
@WebServlet("/user/*")
public class UserServlet extends BaseServlet {
    protected void existsUserName(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        //判断用户是否存在的servelt方法
        req.setCharacterEncoding("utf-8");
        resp.setContentType("text/html;charset=utf-8");

        //获取传入的用户名
        String username = req.getParameter("username");
//        User user  = new User(username);
//        boolean flag = userService.findByUserName(user);
        boolean flag = true;
        resp.getWriter().write(""+flag);

    }
}
